<%@page import="oa.entity.User"%>
<%@page import="oa.service.impl.UserServiceImpl"%>
<%@page import="oa.service.UserService"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page import="oa.entity.Department"%>
<%@page import="oa.paging.Page"%>
<%@page import="oa.service.impl.DepartmentServiceImpl"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<% 
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=utf-8");
DepartmentServiceImpl depart = new  DepartmentServiceImpl();
UserService userService = new UserServiceImpl();
int count = depart.countDepartment(0);
String pageNo = request.getParameter("pageNo");
List<Department> list = new ArrayList<Department>();
if(pageNo==null){
	pageNo="1";
}
Page<Department> pageInfo = new Page<Department>(Integer.parseInt(pageNo), 10);
pageInfo.setTotalRow(count);
List<User> userList = userService.selectAllUser(null, 0, 0);
list = depart.selectAllDepartment(Integer.parseInt(pageNo), 10);
pageInfo.setPageList(list);
request.setAttribute("userList",userList);
request.setAttribute("pageInfolist",pageInfo);

%>


